package com.csproj.dispatch.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Objects;


/**
 * 调度路径表
 */
@ApiModel(description = "调度路径表")
@Entity
@Table(name = "t_dis_dispatch_route")
public class DispatchRoute implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    @Column(name = "id")
    private String id;
    /**
     * 路径编号
     */
    @ApiModelProperty(value = "路径编号")
    @Column(name = "route_code")
    private String routeCode;

    /**
     * 起点站点主键
     */
    @ApiModelProperty(value = "起点站点主键")
    @Column(name = "launchsite_id")
    private String launchsiteId;

    /**
     * 起点仓储公司主键
     */
    @ApiModelProperty(value = "起点仓储公司主键")
    @Column(name = "launchstorage_id")
    private String launchstorageId;

    /**
     * 目的站点主键
     */
    @ApiModelProperty(value = "目的站点主键")
    @Column(name = "destinationsite_id")
    private String destinationsiteId;

    /**
     * 目的仓储公司主键
     */
    @ApiModelProperty(value = "目的仓储公司主键")
    @Column(name = "destinationstorage_id")
    private String destinationstorageId;

    /**
     * 路径具体细节 -- 可能单独成表，存储具体路径细节坐标
     */
    @ApiModelProperty(value = "路径具体细节 -- 可能单独成表，存储具体路径细节坐标")
    @Column(name = "routedetail")
    private String routedetail;

    /**
     * 删除标志
     */
    @ApiModelProperty(value = "删除标志")
    @Column(name = "deleted_flag")
    private Boolean deletedFlag;

    /**
     * 删除人
     */
    @ApiModelProperty(value = "删除人")
    @Column(name = "deleter_user_id")
    private String deleterUserId;

    /**
     * 删除时间
     */
    @ApiModelProperty(value = "删除时间")
    @Column(name = "deletion_time")
    private ZonedDateTime deletionTime;

    /**
     * 最近更新时间
     */
    @ApiModelProperty(value = "最近更新时间")
    @Column(name = "last_modification_time")
    private ZonedDateTime lastModificationTime;

    /**
     * 最近更新人
     */
    @ApiModelProperty(value = "最近更新人")
    @Column(name = "last_modifier_user_id")
    private String lastModifierUserId;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "creation_time")
    private ZonedDateTime creationTime;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    @Column(name = "creator_user_id")
    private String creatorUserId;

    // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRouteCode() {
        return routeCode;
    }

    public DispatchRoute routeCode(String routeCode) {
        this.routeCode = routeCode;
        return this;
    }

    public void setRouteCode(String routeCode) {
        this.routeCode = routeCode;
    }

    public String getLaunchsiteId() {
        return launchsiteId;
    }

    public DispatchRoute launchsiteId(String launchsiteId) {
        this.launchsiteId = launchsiteId;
        return this;
    }

    public void setLaunchsiteId(String launchsiteId) {
        this.launchsiteId = launchsiteId;
    }

    public String getLaunchstorageId() {
        return launchstorageId;
    }

    public DispatchRoute launchstorageId(String launchstorageId) {
        this.launchstorageId = launchstorageId;
        return this;
    }

    public void setLaunchstorageId(String launchstorageId) {
        this.launchstorageId = launchstorageId;
    }

    public String getDestinationstorageId() {
        return destinationstorageId;
    }

    public DispatchRoute destinationstorageId(String destinationstorageId) {
        this.destinationstorageId = destinationstorageId;
        return this;
    }

    public void setDestinationstorageId(String destinationstorageId) {
        this.destinationstorageId = destinationstorageId;
    }

    public String getRoutedetail() {
        return routedetail;
    }

    public DispatchRoute routedetail(String routedetail) {
        this.routedetail = routedetail;
        return this;
    }

    public void setRoutedetail(String routedetail) {
        this.routedetail = routedetail;
    }

    public Boolean isDeletedFlag() {
        return deletedFlag;
    }

    public DispatchRoute deletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
        return this;
    }

    public void setDeletedFlag(Boolean deletedFlag) {
        this.deletedFlag = deletedFlag;
    }

    public String getDeleterUserId() {
        return deleterUserId;
    }

    public DispatchRoute deleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
        return this;
    }

    public void setDeleterUserId(String deleterUserId) {
        this.deleterUserId = deleterUserId;
    }

    public ZonedDateTime getDeletionTime() {
        return deletionTime;
    }

    public DispatchRoute deletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
        return this;
    }

    public void setDeletionTime(ZonedDateTime deletionTime) {
        this.deletionTime = deletionTime;
    }

    public ZonedDateTime getLastModificationTime() {
        return lastModificationTime;
    }

    public DispatchRoute lastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
        return this;
    }

    public void setLastModificationTime(ZonedDateTime lastModificationTime) {
        this.lastModificationTime = lastModificationTime;
    }

    public String getLastModifierUserId() {
        return lastModifierUserId;
    }

    public DispatchRoute lastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
        return this;
    }

    public void setLastModifierUserId(String lastModifierUserId) {
        this.lastModifierUserId = lastModifierUserId;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public DispatchRoute creationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
        return this;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public DispatchRoute creatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
        return this;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }

    public String getDestinationsiteId() {
        return destinationsiteId;
    }

    public DispatchRoute destinationsiteId(String destinationsiteId) {
        this.destinationsiteId = destinationsiteId;
        return this;
    }

    public void setDestinationsiteId(String destinationsiteId) {
        this.destinationsiteId = destinationsiteId;
    }

    // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DispatchRoute dispatchRoute = (DispatchRoute) o;
        if (dispatchRoute.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), dispatchRoute.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "DispatchRoute{" +
            "id=" + getId() +
            ", routeCode='" + getRouteCode() + "'" +
            ", launchsiteId='" + getLaunchsiteId() + "'" +
            ", launchstorageId='" + getLaunchstorageId() + "'" +
            ", destinationstorageId='" + getDestinationstorageId() + "'" +
            ", routedetail='" + getRoutedetail() + "'" +
            ", deletedFlag='" + isDeletedFlag() + "'" +
            ", deleterUserId='" + getDeleterUserId() + "'" +
            ", deletionTime='" + getDeletionTime() + "'" +
            ", lastModificationTime='" + getLastModificationTime() + "'" +
            ", lastModifierUserId='" + getLastModifierUserId() + "'" +
            ", creationTime='" + getCreationTime() + "'" +
            ", creatorUserId='" + getCreatorUserId() + "'" +
            "}";
    }
}
